package com.cloud.common.elasticsearch;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class AggregationMetric {
    private String key;
    private String name;
    private long count;
    private double min;
    private double max;
    private double sum;
    private double avg;
    private String fieldJson;
    private List<AggregationMetric> subMetricList = new ArrayList<>();

    public void addSubMetric(AggregationMetric metric) {
        subMetricList.add(metric);
    }
}
